<template>
	<view class="bg-white radius-24 flex flex-direction goods-item margin-bottom-sm" @tap.stop="navToDetail(info)">
		<view class="fu-block-346">
			<!-- <fu-image :src="info.thumb" mode="aspectFill" :radius="16"></fu-image> -->
			<image class="fu-block-346 radius-16" :src="info.thumb" mode="aspectFill"></image>
		</view>
		<view class="content flex flex-direction justify-between flex-sub">
			<view class="text-df text-333 text-cut-2" >
				{{ info.name }}
			</view>
			<view>
				<view class="margin-top-sm flex align-center margin-top-xs">
					<view class="text-sm text-999 text-cut sales-number">{{i18n['销量']}}{{ info.sales_sum | formatNumber(i18n['万']) }}</view>
				</view>
					
				<view class="flex  align-center text-sm margin-top-sm">
					<text class="text-price text-lg text-bold text-prices  flex-shrink">{{ info | filterGoodsPrice }}</text>
					<text class="text-price text-through margin-left-sm text-999 text-cut">{{ info.market_price }}</text>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
import fuImage from "../fu-image/fu-image";
/**
 * @author 刘畅
 * @description 商品双列布局
 * @param {Object} info - 商品信息
 */
  export default {
    props: {
      info: {
        type: Object
      },
    },
    components:{
      fuImage
    },
    methods: {
      /**
       * @event
       * @description 跳转到商品详情
       * @param {Object} item - 商品信息
       */
      navToDetail(item) {
				let url = '/pages/goods/goodsdetail/goods-detail/index';
			
        this.$urouter.navigateTo({
          url: url,
          params: {
            sku_id: item.sku_id || 0,
            goods_id: item.id,
          }
        })
      },
    },
  }
</script>

<style lang="scss" scoped>
	.goods-item {
		width: 346rpx;
		height: 564rpx;
	}
	.content {
		padding: 20rpx;
	}
</style>
